// 配置所有请求的文件
import { get, post } from './index';

/* ========================菜单的接口=================================== */
// 菜单列表 istree
export const menuList = (params) => get('menulist', params);
// 菜单添加
export const menuAdd = (params) => post('menuadd', params);
// 菜单删除
export const menuDelete = (params) => post('menudelete', params)
// 菜单修改
export const menuEdit = (params) => post('menuedit', params);
// 获取菜单条信息
export const menuInfo = (params) => get('menuinfo', params);

/* ============================角色的接口==================================== */
// 角色列表
export const rolelist = () => get('rolelist');
// 角色添加
export const roleAdd = (params) => post('roleadd', params);
// 角色删除
export const roleDelete = (params) => post('roledelete', params);
// 角色修改
export const roleEdit = (params) => post('roleedit', params);
// 获取角色单条信息
export const roleInfo = (params) => get('roleinfo', params);


/* ============================管理员的接口==================================== */
// 管理员列表  只有总条数
export const userCount = () => get('usercount');
// 管理员添加
export const userAdd = (params) => post('useradd', params);
// 管理员列表  分页
export const userList = (params) => get('userlist', params);
// 管理员删除
export const userDelete = (params) => post('userdelete', params);
// 获取管理员单条信息
export const userInfo = (params) => get('userinfo', params);
// 管理员编辑
export const userEdit = (params) => post('useredit', params)
// 管理员登录
export const userLogin = (params) => post('userlogin', params);

/* ===========================商品分类的接口==================================== */
// 商品分类添加
export const cateAdd = (params) => post('cateadd', params, true);
// 商品分类列表
export const cateList = (params) => get('catelist', params);
// 商品分类获取一条数据
export const cateInfo = (params) => get('cateinfo', params);
// 商品分类修改
// export const cateEdit = (params)=>post('cateedit',params);
export const cateEdit = (params) => post('cateedit', params, true);
// 商品分类删除
export const cateDelete = (params) => post('catedelete', params);

/* ===========================商品属性的接口==================================== */
// 商品属性添加
export const specsAdd = (params) => post('specsadd', params)
// 商品规格总数  用于计算分页
export const specsCount = () => get('specscount');
// 商品规格列表  分页
export const specsList = (params) => get('specslist', params);
// 获取一条商品规格
export const specsInfo = (params) => get('specsinfo', params);
// 商品规格修改
export const specsEdit = (params) => post('specsedit', params);
// 商品规格删除
export const specsDelete = (params) => post('specsdelete', params);

/* ===========================商品管理的接口==================================== */
// 商品管理添加
export const goodsAdd = (params) => post('goodsadd', params, true);
// 商品管理总数
export const goodsCount = () => get('goodscount');
// 商品列表  分页
export const goodsList = (params) => get('goodslist', params);
// 获取一条商品
export const goodsInfo = (params) => get('goodsinfo', params);
// 商品列表修改
export const goodsEdit = (params) => post('goodsedit', params, true);
// 商品列表删除
export const goodsDelete = (params) => post('goodsdelete', params);

/* ===========================会员管理的接口==================================== */
// 获取会员列表
export const memberList = () => get('memberlist');
// 获取会员详情
export const memberInfo = (params) => get('memberinfo', params);
// 会员修改
export const memberEdit = (params) => post('memberedit', params);

/* ===========================轮播图的接口==================================== */
// 轮播图列表
export const bannerList = () => get('bannerlist');
// 轮播图添加
export const bannerAdd = (params) => post('banneradd', params, true);
// 获取轮播图详情
export const bannerInfo = (params) => get('bannerinfo', params);
// 轮播图修改
export const bannerEdit = (params) => post('banneredit', params,true);
// 轮播图删除
export const bannerDelete = (params) => post('bannerdelete', params);

/* ===========================限时秒杀的接口==================================== */
// 限时秒杀添加
export const seckAdd = (params) => post('seckadd', params);
// 限时秒杀列表
export const seckList = ()=>get('secklist');
// 限时秒杀详情
export const seckInfo = (params)=>get('seckinfo',params);
// 限时秒杀修改
export const seckEdit = (params)=>post('seckedit',params);
// 限时秒杀删除
export const seckDelete = (params)=>post('seckdelete',params);